// stores/counter.js
import { defineStore } from 'pinia'
import { ref,reactive } from 'vue'

export const useEquityStore = defineStore('eqityId', () => {
  // 状态数据（相当于 state）
 const userInfo=reactive({
	 username:"",
	 mobile:null,
	 pageName:"",
	 data:[],
 })
 const setUserName=(data)=>{
	 console.log(data);
	 userInfo.username = data
 }
/*  function increment() {
    count.value++
  }

  function decrement() {
    count.value--
  } */

  // 一定要将定义的数据和方法返回
  return {setUserName,userInfo}
}, {
  persist: {
    paths: ['userInfo'],
		// storage:sessionStorage
  }
})